package com.example.xui_study;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.Toast;

import com.xuexiang.xui.XUI;
import com.xuexiang.xui.widget.actionbar.TitleBar;
import com.xuexiang.xui.widget.dialog.materialdialog.MaterialDialog;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends BaseActivity {

    @BindView(R.id.title_no_left)
    TitleBar mTitleNoLeft;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ButterKnife.bind(this);


        //禁用左侧的图标及文字
        mTitleNoLeft.disableLeftView();
    }


    @OnClick({R.id.nav_to_dialog_page,R.id.nav_to_action_bar_page,R.id.nav_to_edit_text_page,
            R.id.nav_to_banner_page,R.id.nav_to_progress_page,R.id.nav_drop_down_refresh_page})
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.nav_to_dialog_page:
                startActivity(new Intent(MainActivity.this,DialogActivity.class));
                break;

            case R.id.nav_to_action_bar_page:
                startActivity(new Intent(MainActivity.this,ActionBarActivity.class));
                break;
            case R.id.nav_to_edit_text_page:
                startActivity(new Intent(MainActivity.this,EditTextActivity.class));
                break;
            case R.id.nav_to_banner_page:
                startActivity(new Intent(MainActivity.this,BannerActivity.class));
                break;
            case R.id.nav_to_progress_page:
                startActivity(new Intent(MainActivity.this,ProgressActivity.class));
                break;
            case R.id.nav_drop_down_refresh_page:
                startActivity(new Intent(MainActivity.this,DropDownRefreshActivity.class));
                break;
        }
    }
}
